//
//  InsetsTextField.m
//  Manager
//
//  Created by 彭凯敏 on 15/8/25.
//  Copyright (c) 2015年 52xiaoluo. All rights reserved.
//

#import "InsetsTextField.h"

@implementation InsetsTextField


// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    
    [self textRectForBounds:self.bounds];
    [self editingRectForBounds:self.bounds];
    
}
//控制 placeHolder 的位置，左右缩 20
- (CGRect)textRectForBounds:(CGRect)bounds {
    return CGRectInset( bounds , 8 , 0 );
}

// 控制文本的位置，左右缩 20
- (CGRect)editingRectForBounds:(CGRect)bounds {
    return CGRectInset( bounds , 8 , 0 );
}
@end
